/* 
 * File:   ThreadPool.cpp
 * Author: bastien
 * 
 * Created on 21 octobre 2010, 15:29
 */

#include "ThreadPool.h"

/*******************/
/* Global Variable */
/*******************/

ThreadPool globalThreadPool;

/*************/
/* Functions */
/*************/

ThreadPool::ThreadPool() { }

ThreadPool::~ThreadPool() { }

void ThreadPool::registerThread(ThreadAble* t)
{
    listofthread.push_back(t);
}

bool ThreadPool::unregisterThread(ThreadAble* t)
{
    bool ret = false;
    for (it = listofthread.begin(); it < listofthread.end(); it++)
    {
        if ((*it) == t)
        {
            listofthread.erase(it);
            it = listofthread.end();
            ret = true;
        }
    }
    return ret;
}

/***************/
/* End Of File */
/***************/

